<at-panel-body>
    <div class="at-List-toolbar">
        <smart-search
            class="at-List-search"
            django-model="projects"
            base-path="projects"
            iterator="project"
            list="vm.list"
            collection="vm.projects"
            dataset="vm.dataset"
            search-tags="searchTags">
        </smart-search>
        <div class="at-List-toolbarAction" ng-show="canAdd">
            <button
                type="button"
                class="at-Button--add"
                id="button-add"
                ui-sref="projects.add">
            </button>
        </div>
    </div>
    <at-list-toolbar
        ng-if="vm.projects.length > 0"
        sort-only="false"
        on-collapse="vm.onCollapse"
        on-expand="vm.onExpand"
        is-collapsed="vm.isCollapsed">
    </at-list-toolbar>
    <at-list results="vm.projects">
        <at-row ng-repeat="project in vm.projects"
            ng-class="{'at-Row--active': (project.id === vm.activeId), 'at-Row--collapsed': vm.isCollapsed}"
            id="row-{{ project.id }}">
            <div class="at-Row-items">
                <div class="at-Row-container">
                    <at-row-item
                        status="{{ project.statusIcon }}"
                        status-tip="{{ project.statusTip }}"
                        status-click="vm.showSCMStatus(project.id)"
                        header-value="{{ project.name }}"
                        header-link="/#/projects/{{ project.id }}"
                        header-tag="{{ vm.projectTypes[project.scm_type] }}">
                    </at-row-item>
                    <div class="at-Row-actions">
                        <div aw-tool-tip="{{ project.scm_update_tooltip }}"
                        data-tip-watch="project.scm_update_tooltip"
                        data-placement="top">
                            <div class="at-RowAction" 
                                ng-class="{'at-RowAction--disabled': project.scm_update_disabled }"
                                ng-click="vm.SCMUpdate(project.id, $event)"
                                ng-show="project.summary_fields.user_capabilities.start">
                                <i class="fa fa-refresh"></i>
                            </div>
                        </div>
                        <at-row-action icon="fa-copy" ng-click="vm.copyProject(project)"
                            ng-show="project.summary_fields.user_capabilities.copy">
                        </at-row-action>
                        <at-row-action icon="fa-trash" ng-click="vm.deleteProject(project.id, project.name)"
                            ng-show="(project.status !== 'updating'
                            && project.status !== 'running' 
                            && project.status !== 'pending' 
                            && project.status !== 'waiting')  
                            && project.summary_fields.user_capabilities.delete">
                        </at-row-action>
                        <at-row-action icon="fa-minus-circle" ng-click="vm.cancelUpdate(project)"
                            ng-show="(project.status == 'updating' 
                            || project.status == 'running' 
                            || project.status == 'pending' 
                            || project.status == 'waiting') 
                            && project.summary_fields.user_capabilities.start">
                        </at-row-action>
                    </div>
                </div>
                <div class="at-Row-container--wrapped">
                    <div class="at-RowItem" ng-if="project.scm_revision">
                        <div class="at-RowItem-label">
                            {{ :: vm.strings.get('list.ROW_ITEM_LABEL_REVISION') }}
                        </div>
                        <at-truncate string="{{ project.scm_revision }}" maxLength="7"></at-truncate>
                    </div>
                    <at-row-item 
                        label-value="{{:: vm.strings.get('list.ROW_ITEM_LABEL_ORGANIZATION')}}"
                        value="{{ project.summary_fields.organization.name }}"
                        value-link="/#/organizations/{{ project.organization }}">
                    </at-row-item>
                    <at-row-item
                        label-value="{{:: vm.strings.get('list.ROW_ITEM_LABEL_MODIFIED') }}"
                        value-bind-html="{{ vm.getLastModified(project) }}">
                    </at-row-item>
                    <at-row-item
                        label-value="{{:: vm.strings.get('list.ROW_ITEM_LABEL_USED') }}"
                        value-bind-html="{{ vm.getLastUsed(project) }}">
                    </at-row-item>
                </div>
            </div>
        </at-row>
    </at-list>
    <paginate
        collection="vm.projects"
        dataset="vm.dataset"
        iterator="project"
        base-path="projects">
    </paginate>
</at-panel-body>